import {Injectable} from '@angular/core';
import {services} from "../../providers/service";

@Injectable()
export class ModifyDataService extends services {
    getCitiesData() {
        return this.getData('./assets/data/city-data.json')
            .then(data => {

                return data;
            }, err => {
                console.log('失败回调');
                return err;
            })
            .catch(fail => {
                console.log('异常了', fail);
            })

    }

    getPersonalData() {
        return this.getData('../../assets/data/personalData.json')
            .then(data => {
                this.personalDetail = data[0].infoData;
                return data;
            }, err => {
                console.log(err);
                return err;
            })
            .catch(fail => {
                console.log(fail);
            })
    }

}